package com.taplinker.client.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

import com.taplinker.client.im.db.DatabaseHelper;
/**
 * 消息数据库
 * @author djbian
 *
 */
public class MessageDBHelper extends DatabaseHelper {
	
	private final String DB_MESSAGE_SQL = "CREATE TABLE [message]"
			+ "([messageId] [VARCHAR(200)],"
			+ "[status] [VARCHAR(10)],"
			+ "[content] TEXT,"
			+ "[from] [VARCHAR(200)],"
			+ "[to] [VARCHAR(200)]);"
			+ "[conversationId] [VARCHAR(200)],"
			+ "[remark] TEXT,"
			+ "[messageTime] INT64,"
			+ "[messageType] [VARCHAR(10)],"
			+ "[userId] [VARCHAR(200)],"
			+ "[userNickname] [VARCHAR(200)],"
			+ "[userName] [VARCHAR(200)],";

	public MessageDBHelper(Context context, String name, CursorFactory factory, int version) {
		super(context, name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(DB_MESSAGE_SQL);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	}
	
}
